package cn.ac.jaas.isc.vegetable.common.security.exception;

import cn.ac.jaas.isc.vegetable.common.security.component.VegetableAuth2ExceptionSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.http.HttpStatus;

/**
 * @author 张高昌
 * @date 2022/4/24 9:28
 * @description: 功能描述
 */
@JsonSerialize(using = VegetableAuth2ExceptionSerializer.class)
public class ServerErrorException extends VegetableAuth2Exception {

    public ServerErrorException(String msg, Throwable t) {
        super(msg);
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "server_error";
    }

    @Override
    public int getHttpErrorCode() {
        return HttpStatus.INTERNAL_SERVER_ERROR.value();
    }
}
